import { throttle, debounce } from 'lodash'
// 节流
const Msg = (msg: () => void) => {
  msg()
}
// 防抖
const debounceHandler = (func: (e?: any) => void) => {
  func()
}
export function debounceHandlerFun(f: () => any, delay: number) {
  const fun = debounce(() => f(), delay)
  fun()
}
export const throttledMsg = throttle(Msg, 500)
export const debounceFunc = debounce(debounceHandler, 500)
